{template 'member', 'header'}
<style type="text/css">
.btn {outline: 0!important;}
.btn {box-shadow: none!important;}
.btn-group-xs>.btn, .btn-xs {padding: 1px 5px;font-size: 12px;border-radius: 3px;}
.btn {display: inline-block;margin-bottom: 0;font-weight: 400;text-align: center;vertical-align: middle;touch-action: manipulation;cursor: pointer;border: 1px solid transparent;white-space: nowrap;padding: 6px 12px;font-size: 14px;line-height: 1.42857;border-radius: 4px;-webkit-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;}
.btn:not(.btn-sm):not(.btn-lg) {line-height: 1.44;}
.btn.green:not(.btn-outline) {color: #FFF;background-color: #32c5d2;border-color: #32c5d2;}
.btn.green:not(.btn-outline).active, .btn.green:not(.btn-outline):active, .btn.green:not(.btn-outline):hover, .open>.btn.green:not(.btn-outline).dropdown-toggle {color: #FFF;background-color: #26a1ab;border-color: #2499a3;}
.btn.red:not(.btn-outline) {color: #fff;background-color: #e7505a;border-color: #e7505a;}
.btn.red:not(.btn-outline).active, .btn.red:not(.btn-outline):active, .btn.red:not(.btn-outline):hover, .open>.btn.red:not(.btn-outline).dropdown-toggle {color: #fff;background-color: #e12330;border-color: #dc1e2b;}
.btn.dark:not(.btn-outline) {color: #FFF;background-color: #2f353b;border-color: #2f353b;}
.btn.dark:not(.btn-outline).active, .btn.dark:not(.btn-outline):active, .btn.dark:not(.btn-outline):hover, .open>.btn.dark:not(.btn-outline).dropdown-toggle {color: #FFF;background-color: #181c1f;border-color: #141619;}
.btn.yellow:not(.btn-outline) {color: #fff;background-color: #c49f47;border-color: #c49f47;}
.btn.yellow:not(.btn-outline).active, .btn.yellow:not(.btn-outline):active, .btn.yellow:not(.btn-outline):hover, .open>.btn.yellow:not(.btn-outline).dropdown-toggle {color: #fff;background-color: #a48334;border-color: #9c7c32;}
.btn.blue:not(.btn-outline) {color: #FFF;background-color: #3598dc;border-color: #3598dc;}
.btn.blue:not(.btn-outline).active, .btn.blue:not(.btn-outline):active, .btn.blue:not(.btn-outline):hover, .open>.btn.blue:not(.btn-outline).dropdown-toggle {color: #FFF;background-color: #217ebd;border-color: #1f78b5;}
</style>
<script type="text/javascript" src="{JS_PATH}layer/layer.js"></script>
<script>
var syncing = 0;
function sync_web() {
	if (syncing == 1) {
		dr_tips(0, '{L('sync_server')}');
		return;
	}
	syncing = 1;
	$('#sync_html').html('<font color="blue">{L('sync_server_data')}</font>');
	$.ajax({
		type: "GET",
		dataType: "json",
		url: "<?php echo APP_PATH?>index.php?m=fclient&c=member&a=sync_web&id={$id}",
		success: function(json) {
			if (json.code) {
				$('#sync_html').html('<font color="green">'+json.msg+'</font>');
			} else {
				layer.open({
					type: 1,
					title: '{L('sync_fail')}',
					closeBtn: 0, //不显示关闭按钮
					shadeClose : true,
					scrollbar: false,
					content: '<div style="padding: 30px;">'+json.msg+'</div>'
				});
				$('#sync_html').html('<font color="red">{L('sync_fail')}</font>');
			}
			syncing = 0;
		},
		error: function(HttpRequest, ajaxOptions, thrownError) {
			//alert(HttpRequest.responseText);
			$('#sync_html').html('<font color="red">{L('sync_server_not')}</font>');
			syncing = 0;
		}
	});
}
</script>
<div class="member_container main">
    {template 'member', 'left'}
    <div class="main_right">
        <div class="tit">
            <h3>{L('sync')}</h3>
        </div>
        <div class="main_cont">
            <table>
                <tr>
                    <td width="100">{L('name')}：</td>
                    <td>{$name}</td>
                </tr>
                <tr>
                    <td width="100">{L('domain')}：</td>
                    <td><a href="{$domain}" target="_blank">{$domain}</a></td>
                </tr>
                <tr>
                    <td width="100">{L('status')}：</td>
                    <td>{if $status==1}{L('no_check')}{elseif $status==2}{L('check_2')}{elseif $status==3}{L('check_3')}{elseif $status==4}{L('check_4')}{/if} {if $status != 2} <p> {$setting[note]} </p> {/if}</td>
                </tr>
                <tr>
                    <td width="100">{L('period_time')}：</td>
                    <td>{if $inputtime}{date('Y-m-d',$inputtime)}{/if} ~ {if $endtime}{date('Y-m-d',$endtime)}{/if}</td>
                </tr>
                <tr>
                    <td width="100">{L('site_manage')}：</td>
                    <td><p class="help-block margin-bottom-15" id="sync_html"> &nbsp; </p>

                    <p class="help-block"><a href="javascript:sync_web();" class="btn btn-sm red">
                        <i class="fa fa-cog"></i> {L('and_sync')} </a></p>
                    <p class="help-block"> {L('sync_note')} </p>


                    <p class="help-block margin-top-15"><a target="_blank" href="index.php?m=fclient&c=member&a=sync_admin&id={$id}" class="btn btn-sm green">
                        <i class="fa fa-user"></i> {L('sync_admin')} </a></p>
                    <p class="help-block"> {L('sync_admin_note')} </p>

                    <p class="help-block margin-top-15">
                        <a href="index.php?m=fclient&c=member&a=down&id={$id}" class="btn btn-sm blue">
                            <i class="fa fa-plus"></i> {L('sync_down')} </a></p>
                    <p class="help-block"> {L('sync_down_note')} </p></td>
                </tr>
            </table>
        </div>
    </div>
</div>
{template 'member', 'footer'}